package net.thunderklaus.scala_ejb

import javax.ejb._
import javax.annotation.PostConstruct


@Remote
trait CalcBean {
	def add(x: Int, y: Int): Int
}


@Local
trait CalcBeanLocal {
	def add(x: Int, y: Int): Int
}


@Stateless
class CalcBeanImpl extends CalcBean with CalcBeanLocal {

	@PostConstruct
	private def init() {
		println("Post construct called for " + this)
	}
	
	override def add(x: Int, y: Int) = x + y
}
